//
// Created on 2024/4/19.
//
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
// please include "napi/native_api.h".

#pragma once

#include <native_vsync/native_vsync.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <EGL/eglplatform.h>
#include <GLES3/gl3.h>

class glesmain {

public:
    void OnSurfaceCreateCB(void *component, void *window);


    void OnFrame();

private:
    EGLNativeWindowType m_egl_window;
    EGLDisplay m_eglDisplay= EGL_NO_DISPLAY;
    EGLConfig m_eglConfig = EGL_NO_CONFIG_KHR;
    EGLSurface m_eglSurface = EGL_NO_SURFACE;
    EGLContext m_eglContext = EGL_NO_CONTEXT;
    OH_NativeVSync * m_sync;
};
